<template>
  <div class="box">
    <div class="box_title">
      {{details.title}}
    </div>
    <div class="box_time overflowEllipsis">
      <div v-show="this.$route.query.type == 2 || this.$route.query.type == 3" class="box_time_item box_time_item1">
        <div> 举办方：</div>
        <div>{{details.jbf}}</div>
      </div>
      <div class="box_time_item">
        <div>召开时间：</div>
        <div>{{details.startTime}}</div>
      </div>
      <div v-show="this.$route.query.type == 2 || this.$route.query.type == 3" class="box_time_item">
        <div>上传组织：</div>
        <div>{{details.meetingPlace}}</div>
      </div>
    </div>
    <div class="box_txt" v-html="details.content">

    </div>
  </div>
</template>
<script>
import taskApi from "../../requestApi/taskApi";
import { Toast } from "mint-ui";
export default {
  components: {},
  data() {
    return {
      details: {}
    };
  },
  created: function() {},
  mounted() {
    let self = this;
    self.baseUserMessageDistributeFun();
    window.getAppgetUserToken = function(val) {
      self.baseUserInfoFun(val);
      if (self.$route.query.type == 1) {
        self.listShykFun();
      } else if (self.$route.query.type == 2) {
        self.listMzFun();
      } else if (self.$route.query.type == 3) {
        self.listZZFun();
      } else if (self.$route.query.type == 4) {
        self.listZbhdFun();
      }
    };
    this.titleFun({
      title: "详情"
    });
  },
  methods: {
    async listShykFun() {
      let self = this;
      let params = {
        id: this.$route.query.id
      };
      let res = await taskApi.GetApithreemeetonelessoninfo(params);
      if (res.statusCode == 200) {
        self.details = {
          ...res.data
        };
      } else {
        Toast({
          message: res.statusMessage,
          position: "bottom"
        });
      }
    },
    async listZZFun() {
      let self = this;
      let params = {
        id: this.$route.query.id
      };
      let res = await taskApi.GetApiorgfemeetinginfo(params);
      if (res.statusCode == 200) {
        self.details = {
          ...res.data
        };
      } else {
        Toast({
          message: res.statusMessage,
          position: "bottom"
        });
      }
    },
    async listMzFun() {
      let self = this;
      let params = {
        id: this.$route.query.id
      };
      let res = await taskApi.GetApidemocraticlifemeetinginfo(params);
      if (res.statusCode == 200) {
        self.details = {
          ...res.data
        };
      } else {
        Toast({
          message: res.statusMessage,
          position: "bottom"
        });
      }
    },
    async listZbhdFun() {
      let self = this;
      let params = {
        id: this.$route.query.id
      };
      let res = await taskApi.GetApibranchactivityinfo(params);
      if (res.statusCode == 200) {
        self.details = {
          ...res.data
        };
      } else {
        Toast({
          message: res.statusMessage,
          position: "bottom"
        });
      }
    }
  },
  filters: {},
  watch: {},
  computed: {}
};
</script>
<style scoped>
.box_time_item {
  height: 0.5333rem;
  line-height: 0.5333rem;
  width: 100%;
  display: flex;
  margin-top: 0.1066rem;
}
.box_time_item > div:nth-child(2) {
  width: calc(100% - 1.6rem - 2.0533rem - 0.2667rem);
  height: 0.5333rem;
  line-height: 0.5333rem;
  font-size: 0.2933rem;
  font-family: PingFang-SC-Medium;
  font-weight: 500;
  color: rgba(102, 102, 102, 0.78);
}
.box_time_item > div:nth-child(1) {
  width: 1.6rem;
  height: 0.5333rem;
  line-height: 0.5333rem;
  font-size: 0.2933rem;
  font-family: PingFang-SC-Medium;
  font-weight: 500;
  color: rgba(94, 94, 94, 1);
  text-align: right;
  display: block;
  overflow: hidden;
  margin-left: 1.3333rem;
}
.box_txt {
  width: calc(100% - 0.5333rem);
  margin-left: 0.2667rem;
  margin-top: 0.4533rem;
  margin-bottom: 1.0933rem;
  overflow: hidden;
  font-size: 0.3733rem;
  font-family: MicrosoftYaHei;
  font-weight: 400;
  color: rgba(51, 51, 51, 1);
  line-height: 0.64rem;
}
.box_time {
  width: calc(100% - 1.6rem);
  margin-left: 0.8rem;
  /* height: 2.08rem; */
  padding-bottom: 0.1867rem;
  overflow: hidden;
  background: rgba(242, 247, 249, 1);
  border-radius: 0.0533rem;
  margin-top: 0.4267rem;
}
.box_title {
  width: calc(100% - 0.5333rem);
  margin-left: 0.2667rem;
  min-height: 0.5867rem;
  line-height: 0.5867rem;
  font-size: 0.4533rem;
  font-family: MicrosoftYaHei;
  font-weight: 400;
  color: rgba(51, 51, 51, 1);
  margin-top: 0.4rem;
  text-align: center;
}
.box {
  background: #fff;
  overflow: hidden;
  width: 100%;
  height: 100vh;
  overflow-y: scroll;
}
</style>